package com.wsoft.form.service;

import com.github.pagehelper.PageInfo;
import com.wsoft.form.query.operation.LinkListQuery;
import com.wsoft.form.query.operation.OperationInsertQuery;
import com.wsoft.form.query.operation.OperationListQuery;
import com.wsoft.form.query.operation.OperationUpdateQuery;

import java.util.List;
import java.util.Map;

/**
 * @Author z001
 * @Date 2024/8/30 14:57
 */
public interface IWfFormOperationService {

    /**
     * 保存数据
     * @param query
     */
    void addOperation(OperationInsertQuery query);

    /**
     * 更新数据
     * @param query
     */
    void updateOperation(OperationUpdateQuery query);


    /**
     * 删除数据
     * @param designId
     * @param dataId
     */
    void delOperation(Long designId, List<Long> dataId);

    /**
     * 查询数据
     * @param query
     * @return
     */
    PageInfo<Map<String, Object>> listOperation(OperationListQuery query);

    /**
     * 关联表查询数据
     * @param query
     * @return
     */
    PageInfo<Map<String, Object>> linkList(LinkListQuery query);

    /**
     * 获取数据详情
     * @param designId designId
     * @param dataId 数据id
     * @return
     */
    Map<String, Object> getOperation(Long designId, Long dataId);
}
